package com.vito.demo.jxau

import com.vito.demo.jxau.addons.fetchPersonalScore
import com.vito.demo.jxau.addons.fetchPersonalTimetable
import com.vito.demo.jxau.core.fetchCookies
import java.util.*

/**
 * Created by lingzhiyuan.
 * Date : 16/6/13.
 * Time : 12:11.
 * Description:
 *
 */

fun main(args: Array<String>) {

    val config = Properties()
    val loader = Thread.currentThread().contextClassLoader;
    config.load(loader.getResourceAsStream("config.properties"))
    val username = config.getProperty("username")
    val password = config.getProperty("password")
    val cookies = fetchCookies(username, password)

    val list = fetchPersonalScore(cookies)
    list?.forEach { println(it) }
    val list2 = fetchPersonalTimetable(cookies, 20141)
    list2?.forEach { println(it.Message) }
}

